package com.ljh.controller;

import com.ljh.model.entity.User;
import org.springframework.web.bind.annotation.*;

/**
 * @author: ljh
 *
 * knife4j 测试接口:
 * http://localhost:8081/doc.html#/home
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/test")
    public String test() {
        return "hello world";
    }

    @PostMapping("/add")
    public String add(@RequestBody User user) {
        return "请求的User为:" + user.toString();
    }
}
